<template>
  <div class="svc-exception panel">
    <main class="mian">
     <el-row style="height: 100%;" :gutter="14">
       <el-col style="height: 100%;" :span="12">
        <div class="main-panel">
          <AreaServiceInvoke :code="code" :time="time" :refresh="refresh" :areas="areas" />
        </div> 
      </el-col>
      <el-col style="height: 100%;" :span="12">
        <div class="main-panel right">
          <InvokeTrend :code="code" :time="time" :refresh="refresh" />
        </div> 
      </el-col>
     </el-row>
    </main>
  </div>
</template>

<script>
import { ref, reactive, onMounted } from 'vue'
import InvokeTrend from './InvokeTrend'
import AreaServiceInvoke from './AreaServiceInvoke'

export default {
  name: 'AreaInvoke',
  components: {
    AreaServiceInvoke,
    InvokeTrend
  },
  props: {
    time: {
      type: Object,
      default: () => { }
    },
    code: { // 地区code
      type: String,
      default: ''
    },
    refresh: {
      type: Number,
    },
    areas: {
      type: Array,
      default: () => []
    }
  },
  setup(props) {
    
    return {
      
    }
  }
}
</script>

<style lang="scss" scoped>
@import '../style.scss';
.main-panel {
  height: 100%;
  background-image: url(@/assets/screendeck/background/area-invoke-chart.png);
  background-size: 100% 100%;
  &.right {
     background-image: url(@/assets/screendeck/background/invoke-chart.png);
     background-size: 100% 100%;
  }
}

.svc-exception {
  height: 100%;
 
  main {
     height: 100%;
  }

  .list {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    height: 100%;
    box-sizing: border-box;
    overflow: auto;
    scroll-behavior: smooth;

    .list-item {
      position: relative;
      margin: 5px;
      padding: 10px 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: calc(50% - 10px);
      height: calc(50% - 10px);
      font-family: PingFangSC-Semibold, PingFang SC;
      background-image: url(../../../assets/bigscreen/exception-line-bg.png);
      background-size: 100% 100%;

      
      .title,.date,.state {
        padding-left: 20px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        height: 33.3%;
        font-size: 14px;
        color: #FFFFFF;
      }

      .btn {
        position: absolute;
        right:20px; 
        top: 14px;
        padding: 5px 5px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 24px;
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #E1EEFF;
        background-image: url(../../../assets/bigscreen/api-up-btn_base.png);
        background-repeat: no-repeat;
        background-size: 100% 100%;
        cursor: pointer;
      }
      .title {
        font-size: 16px;
        font-weight: 600;
        color: #5CFFF3;
      }
      
      .state > span{
        color: rgba(255, 101, 0, 1);
      } 
    }
  }
}
</style>